package org.ee.core.api;

import io.swagger.v3.oas.annotations.media.Schema;

import java.io.Serializable;
import java.util.List;

/**
 * 分页组件
 * @Author jokr
 * @Date 2025/8/27 下午3:00
 */
public class PageResult <T> implements Serializable {
    private Long total;
    private Integer page;
    private Integer size;
    private List<T> rows;

    public PageResult(){}

    /**
     * 封装
     * @param total
     * @param size
     * @param page
     * @param rows
     */
    public PageResult(Long total, Integer size, Integer page, List<T> rows) {
        this.total = total;
        this.rows = rows;
        this.size = size;
        this.page = page;
    }

    public Long getTotal() {
        return total;
    }

    public void setTotal(Long total) {
        this.total = total;
    }

    public Integer getPage() {
        return page;
    }

    public void setPage(Integer page) {
        this.page = page;
    }

    public Integer getSize() {
        return size;
    }

    public void setSize(Integer size) {
        this.size = size;
    }

    public List<T> getRows() {
        return rows;
    }

    public void setRows(List<T> rows) {
        this.rows = rows;
    }
}
